import $store from '@/store'

export default (param) => {
  const width = 323
  const height = 474
  const userInfo = $store.getters.userInfo
  return {
    css: {
      width: `${width * 2}rpx`,
      height: `${height * 2}rpx`,
      backgroundImage: `url(${CDN('/common/static/images/share/poster_646x948.png')})`,
    },
    views: [
      {
        src: CDN('/common/static/images/share/share_200x160.png'),
        type: 'image',
        css: {
          marginTop: '30rpx',
          marginLeft: '30rpx',
          background: '#fff',
          objectFit: 'cover',
          width: '84rpx',
          border: '2rpx solid #fff',
          boxSizing: 'border-box',
          height: '84rpx',
          borderRadius: '50%',
        },
      },
      {
        type: 'view',
        css: {
          marginTop: '30rpx',
          paddingLeft: '20rpx',
          display: 'inline-block',
        },
        views: [
          {
            text: '隔壁老王666',
            type: 'text',
            css: {
              display: 'block',
              paddingBottom: '10rpx',
              color: '#333',
              fontSize: '32rpx',
              fontWeight: 'bold',
            },
          },
          {
            text: '为您挑选了一个好物',
            type: 'text',
            css: {
              color: '#666',
              fontSize: '24rpx',
            },
          },
        ],
      },
      {
        css: {
          marginTop: '270rpx',
          padding: '30rpx',
          boxSizing: 'border-box',
          borderRadius: '16rpx',
          width: `${width * 2}rpx`,
          boxShadow: '0 20rpx 58rpx rgba(0,0,0,.15)',
        },
        views: [
          {
            css: {
              marginTop: '32rpx',
              color: '#FF0000',
              fontWeight: 'bold',
              fontSize: '28rpx',
              lineHeight: '1em',
            },
            views: [
              {
                text: '￥',
                type: 'text',
                css: {
                  verticalAlign: 'bottom',
                },
              },
              {
                text: '39',
                type: 'text',
                css: {
                  verticalAlign: 'bottom',
                  fontSize: '58rpx',
                },
              },
              {
                text: '.39',
                type: 'text',
                css: {
                  verticalAlign: 'bottom',
                },
              },
              {
                text: '￥59.99',
                type: 'text',
                css: {
                  verticalAlign: 'bottom',
                  paddingLeft: '10rpx',
                  fontWeight: 'normal',
                  textDecoration: 'line-through',
                  color: '#999999',
                },
              },
            ],

            type: 'view',
          },
          {
            css: {
              marginTop: '32rpx',
              fontSize: '26rpx',
              color: '#8c5400',
            },
            views: [
              {
                text: '自营',
                type: 'text',
                css: {
                  color: '#212121',
                  background: '#ffb400',
                },
              },
              {
                text: '30天最低价',
                type: 'text',
                css: {
                  marginLeft: '16rpx',
                  background: '#fff4d9',
                  textDecoration: 'line-through',
                },
              },
              {
                text: '满减优惠',
                type: 'text',
                css: {
                  marginLeft: '16rpx',
                  background: '#fff4d9',
                },
              },
              {
                text: '超高好评',
                type: 'text',
                css: {
                  marginLeft: '16rpx',
                  background: '#fff4d9',
                },
              },
              {
                text: '360儿童电话手表9X 智能语音问答定位支付手表 4G全网通20米游泳级防水视频通话拍照手表男女孩星空蓝',
                type: 'text',
                css: {
                  paddingRight: '32rpx',
                  boxSizing: 'border-box',
                  lineClamp: 2,
                  color: '#333333',
                  lineHeight: '1.8em',
                  fontSize: '36rpx',
                  width: '478rpx',
                },
              },
            ],
            type: 'view',
          },
          {
            css: {
              marginTop: '30rpx',
            },
            views: [
              {
                text: 'limeui.qcoon.cn',
                type: 'qrcode',
                css: {
                  width: '128rpx',
                  height: '128rpx',
                  marginLeft: '24rpx',
                },
              },
            ],
            type: 'view',
          },
        ],
        type: 'view',
      },
    ],
  }
}
